Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move from int64_t to uint64_t to avoid bit shifting negative numbers (UB in C++) #37252

Merged
merged 1 commit into from
Mar 17, 2022

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Mar 15, 2022

PR description:

In partial response to #35036 (comment).
Followed suggestion at #35036 (comment) (e.g. xx, yy , track_eta and track_phi can be negative, hence when casted to int64_t - and preserving the sign, the bit shift can lead to undefined behaviour), so changed the cast from int64_t to uint64_t.
This solution has also been privately discussed with the original author @vberta

PR validation:

cmssw compiles, also run a typical battery of ad-hoc relvals with seedingDeepCore enabled:

runTheMatrix.py --what upgrade -l 11634.17,11723.17,11834.17,11923.17 --ibeos

if this PR is a backport please specify the original PR and why you need to backport that PR:

N/A

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37252/28857

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @mmusich (Marco Musich) for master.

It involves the following packages:

  • RecoTracker/TkSeedGenerator (reconstruction)

@jpata, @cmsbuild, @clacaputo, @slava77 can you please review it and eventually sign? Thanks.
@felicepantaleo, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @ebrondol, @gpetruc, @mmusich, @mtosi, @dgulhan this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@jpata
Copy link
Contributor

jpata commented Mar 15, 2022

test parameters:

  • workflows = 11634.17,11723.17,11834.17,11923.17
  • relvals_opt = --what standard,highstats,pileup,generator,production,ged,machine,premix,upgrade

@jpata
Copy link
Contributor

jpata commented Mar 15, 2022

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7e8cea/23139/summary.html
COMMIT: 4f131bf
CMSSW: CMSSW_12_4_X_2022-03-15-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/37252/23139/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-7e8cea/11634.17_TTbar_14TeV+2021_seedingDeepCore+TTbar_14TeV_TuneCP5_GenSim+Digi+RecoNano+HARVESTNano
  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-7e8cea/11723.17_QCD_Pt_1800_2400_14+2021_seedingDeepCore+QCD_Pt_1800_2400_14TeV_TuneCP5_GenSim+Digi+RecoNano+HARVESTNano
  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-7e8cea/11834.17_TTbar_14TeV+2021PU_seedingDeepCore+TTbar_14TeV_TuneCP5_GenSim+DigiPU+RecoNanoPU+HARVESTNanoPU
  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-7e8cea/11923.17_QCD_Pt_1800_2400_14+2021PU_seedingDeepCore+QCD_Pt_1800_2400_14TeV_TuneCP5_GenSim+DigiPU+RecoNanoPU+HARVESTNanoPU

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4378029
  • DQMHistoTests: Total failures: 8
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4377999
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 52 files compared)
  • Checked 220 log files, 55 edm output root files, 53 DQM output files
  • TriggerResults: no differences found

@jpata
Copy link
Contributor

jpata commented Mar 16, 2022

(running UBSAN offline...)

@jpata
Copy link
Contributor

jpata commented Mar 17, 2022

+reconstruction

  • technical bugfix
  • UBSAN error runtime error: left shift of negative value disappears (checked offline)
  • no reco differences (none expected, as DeepCore is not running by default)

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Mar 17, 2022

+1

@cmsbuild cmsbuild merged commit c382a8d into cms-sw:master Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants